<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>BIBLIO: /home/marco/workspace/biblio/src/bibclient.c File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">BIBLIO
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">/home/marco/workspace/biblio/src/bibclient.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Client del progetto biblio.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;ctype.h&gt;</code><br/>
<code>#include &lt;errno.h&gt;</code><br/>
<code>#include &lt;limits.h&gt;</code><br/>
<code>#include &lt;pthread.h&gt;</code><br/>
<code>#include &lt;signal.h&gt;</code><br/>
<code>#include &lt;stdio.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="bib_8h_source.html">bib.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="biblio_8h_source.html">biblio.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="bibclient_8h_source.html">bibclient.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="comsock_8h_source.html">comsock.h</a>&quot;</code><br/>
</div><table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibclient_8c.html#a0ddf1224851353fc92bfbff6f499fa97">main</a> (int argc, char *argv[])</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Main del client.  <a href="#a0ddf1224851353fc92bfbff6f499fa97"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibclient_8c.html#a50fe4e9320fbfcdc05ac4fa6a9b1df95">parse_option</a> (char *arg)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Funzione di parsing dei parametri da riga di comando.  <a href="#a50fe4e9320fbfcdc05ac4fa6a9b1df95"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibclient_8c.html#acb38121ae172344d7a82a5cc6c4be962">option_formats</a> [] = <a class="el" href="bibclient_8h.html#a6a58846379c515dca21870f11b250b58">OPTION_FORMATS</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibclient_8c.html#a4b68c33e5302c7f6ae2ffa10ee23cdc9">message_fields</a> [] = MESSAGE_FIELDS</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmessage__t.html">message_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibclient_8c.html#a1bac7c8cafc9909ba9c076214a6b0c0b">msg</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmessage__t.html">message_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibclient_8c.html#aca0c4f41341a2be05205f12c5431ba8f">res</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibclient_8c.html#a9a70f6d55854f814402e7dc9ef0a91e3">fields</a> [<a class="el" href="bib_8h.html#a94a9355898094a43596f429ebd6c6313">NCAMPI</a>]</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Client del progetto biblio. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>Marco Luisi Si dichiara che il contenuto di questo file e' in ogni sua parte opera originale dell' autore. </dd></dl>
</div><hr/><h2>Function Documentation</h2>
<a class="anchor" id="a0ddf1224851353fc92bfbff6f499fa97"></a><!-- doxytag: member="bibclient.c::main" ref="a0ddf1224851353fc92bfbff6f499fa97" args="(int argc, char *argv[])" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="testserv_8c.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>argv</em>[]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Main del client. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">argv</td><td>Opzioni di lancio del client </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Exit status del programma </dd></dl>

<p>References <a class="el" href="bibclient_8h.html#a5097dcc4b8a18f11d152b12d2344660b">BIB_END</a>, <a class="el" href="structmessage__t.html#a670e35a55f39260aab8a626b6ba04e82">message_t::buffer</a>, <a class="el" href="comsock_8c.html#a730d0b220efe4930f0793030846efa52">closeConnection()</a>, <a class="el" href="bibclient_8h.html#afb6b8c4d21f9183c9c65f548d976af2f">CONF</a>, <a class="el" href="bibclient_8h.html#a1ebf69baf0d09a7865b0fbcfd59c48f6">ERR_PARAM</a>, <a class="el" href="bib_8h.html#aa93f0eb578d23995850d61f7d61c55c1">FALSE</a>, <a class="el" href="structmessage__t.html#ae42a6394ce558e3e54470afd3862d9db">message_t::length</a>, <a class="el" href="comsock_8h.html#abe9a795da4c8ef9d50edace5ed7aa8af">MSG_QUERY</a>, <a class="el" href="bib_8h.html#a94a9355898094a43596f429ebd6c6313">NCAMPI</a>, <a class="el" href="comsock_8h.html#aa47186c9efea8899b8c1c33314071f26">NSEC</a>, <a class="el" href="comsock_8h.html#ae8d18b9066459a019d8e091fa929f747">NTRIAL</a>, <a class="el" href="comsock_8c.html#a88e5df18d7721b744bed4208fc97c3bb">openConnection()</a>, <a class="el" href="bibclient_8c.html#a50fe4e9320fbfcdc05ac4fa6a9b1df95">parse_option()</a>, <a class="el" href="comsock_8c.html#a7342cc411ed1bd599f84d90d13ef4d86">receiveMessage()</a>, <a class="el" href="comsock_8c.html#aa4a2380316658b900ce7086466887c4f">sendMessage()</a>, <a class="el" href="bib_8h.html#aa8cecfc5c5c054d2875c03e77b7be15d">TRUE</a>, <a class="el" href="structmessage__t.html#a2088bcda29404ae1e84f99388bee473f">message_t::type</a>, and <a class="el" href="comsock_8h.html#a7baab2aa5bf8eb14b6128e0f16634837">UNIX_PATH_MAX</a>.</p>

</div>
</div>
<a class="anchor" id="a50fe4e9320fbfcdc05ac4fa6a9b1df95"></a><!-- doxytag: member="bibclient.c::parse_option" ref="a50fe4e9320fbfcdc05ac4fa6a9b1df95" args="(char *arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="bibclient_8h.html#a50fe4e9320fbfcdc05ac4fa6a9b1df95">parse_option</a> </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>arg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Funzione di parsing dei parametri da riga di comando. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">arg</td><td>argomento da linea di comando da parsare </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>risultato del parsing </dd></dl>

<p>References <a class="el" href="structmessage__t.html#a670e35a55f39260aab8a626b6ba04e82">message_t::buffer</a>, <a class="el" href="bibclient_8c.html#a9a70f6d55854f814402e7dc9ef0a91e3">fields</a>, <a class="el" href="structmessage__t.html#ae42a6394ce558e3e54470afd3862d9db">message_t::length</a>, <a class="el" href="bib_8h.html#a9dbede8174e19bee24e514e6b6d9ae5b">LLSTRING</a>, <a class="el" href="comsock_8h.html#ad7871643c05865c80f5d8050aead2b57">MAXBUF</a>, <a class="el" href="bibclient_8c.html#a4b68c33e5302c7f6ae2ffa10ee23cdc9">message_fields</a>, <a class="el" href="comsock_8h.html#a32ee7130b0d9855c703edd428790e506">MSG_LOAN</a>, <a class="el" href="bib_8h.html#a94a9355898094a43596f429ebd6c6313">NCAMPI</a>, <a class="el" href="bibclient_8c.html#acb38121ae172344d7a82a5cc6c4be962">option_formats</a>, <a class="el" href="bib_8c.html#a92a6aa4df4336a951d2ddd7ade816790">parse()</a>, and <a class="el" href="structmessage__t.html#a2088bcda29404ae1e84f99388bee473f">message_t::type</a>.</p>

<p>Referenced by <a class="el" href="bibclient_8c.html#a0ddf1224851353fc92bfbff6f499fa97">main()</a>.</p>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="a9a70f6d55854f814402e7dc9ef0a91e3"></a><!-- doxytag: member="bibclient.c::fields" ref="a9a70f6d55854f814402e7dc9ef0a91e3" args="[NCAMPI]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="bibclient_8c.html#a9a70f6d55854f814402e7dc9ef0a91e3">fields</a>[<a class="el" href="bib_8h.html#a94a9355898094a43596f429ebd6c6313">NCAMPI</a>]<code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Array per il controllo della presenza di opzioni multiple </p>

<p>Referenced by <a class="el" href="bib_8c.html#a2c3d873c7c5e2b2ae191536d58bd6795">field_match()</a>, <a class="el" href="bib_8c.html#a92a6aa4df4336a951d2ddd7ade816790">parse()</a>, and <a class="el" href="bibclient_8h.html#a50fe4e9320fbfcdc05ac4fa6a9b1df95">parse_option()</a>.</p>

</div>
</div>
<a class="anchor" id="a4b68c33e5302c7f6ae2ffa10ee23cdc9"></a><!-- doxytag: member="bibclient.c::message_fields" ref="a4b68c33e5302c7f6ae2ffa10ee23cdc9" args="[]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* <a class="el" href="bibclient_8c.html#a4b68c33e5302c7f6ae2ffa10ee23cdc9">message_fields</a>[] = MESSAGE_FIELDS</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Campi per il messaggio al server </p>

<p>Referenced by <a class="el" href="bibclient_8h.html#a50fe4e9320fbfcdc05ac4fa6a9b1df95">parse_option()</a>.</p>

</div>
</div>
<a class="anchor" id="a1bac7c8cafc9909ba9c076214a6b0c0b"></a><!-- doxytag: member="bibclient.c::msg" ref="a1bac7c8cafc9909ba9c076214a6b0c0b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structmessage__t.html">message_t</a> <a class="el" href="bibclient_8c.html#a1bac7c8cafc9909ba9c076214a6b0c0b">msg</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Messaggio di richiesta da inviare alle biblioteche </p>

<p>Referenced by <a class="el" href="testcli_8c.html#a3c04138a5bfe5d72780bb7e82a18e627">main()</a>.</p>

</div>
</div>
<a class="anchor" id="acb38121ae172344d7a82a5cc6c4be962"></a><!-- doxytag: member="bibclient.c::option_formats" ref="acb38121ae172344d7a82a5cc6c4be962" args="[]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* <a class="el" href="bibclient_8c.html#acb38121ae172344d7a82a5cc6c4be962">option_formats</a>[] = <a class="el" href="bibclient_8h.html#a6a58846379c515dca21870f11b250b58">OPTION_FORMATS</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Pattern delle opzioni utente </p>

<p>Referenced by <a class="el" href="bibclient_8h.html#a50fe4e9320fbfcdc05ac4fa6a9b1df95">parse_option()</a>.</p>

</div>
</div>
<a class="anchor" id="aca0c4f41341a2be05205f12c5431ba8f"></a><!-- doxytag: member="bibclient.c::res" ref="aca0c4f41341a2be05205f12c5431ba8f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structmessage__t.html">message_t</a> <a class="el" href="bibclient_8c.html#aca0c4f41341a2be05205f12c5431ba8f">res</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Messaggio di risposta dalle biblioteche </p>

<p>Referenced by <a class="el" href="bib_8h.html#a012f0957a057de5eafe85b6d17c54307">new_scheda()</a>, and <a class="el" href="bibserver_8h.html#a84e414317c5f9ca3e549c1c419f2acc4">save()</a>.</p>

</div>
</div>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Fri Jun 29 2012 10:36:44 for BIBLIO by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
